# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Maintainer: Ionut Biru <ibiru@archlinux.org>

pkgname=folks
pkgver=0.11.4+42+g5520ed9a
pkgrel=1
pkgdesc="Library to aggregates people into metacontacts"
arch=(x86_64)
url="https://wiki.gnome.org/Projects/Folks"
license=(LGPL2.1)
depends=(telepathy-glib libgee libxml2 evolution-data-server)
makedepends=(gobject-introspection gtk-doc vala git)
_commit=5520ed9ae07aac085b73bd7b48aab832ab04b418  # master
source=("git+https://gitlab.gnome.org/GNOME/folks.git#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  cd $pkgname
  NOCONFIGURE=1 ./autogen.sh
}

build() {
  cd $pkgname

  ./configure --prefix=/usr --disable-schemas-compile \
    --disable-libsocialweb-backend --disable-fatal-warnings

  # https://bugzilla.gnome.org/show_bug.cgi?id=655517
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool

  make
}

package() {
  cd $pkgname
  make DESTDIR="$pkgdir" install
}

# vim:set ts=2 sw=2 et:
